<template>
  <div>
    <div class="reportY">
      <div class="reportHead">
        <img
          src="../assets/img/箭头.png"
          alt=""
          width="20px"
          height="20px"
          @click="go"
        />
        <h3>借记卡销户</h3>
      </div>
      <div class="reportFoot">
        <div class="reportFoot1">
          账户
          <p>{{ cardNumber }}</p>
        </div>
        <div class="reportFoot2">
          账户密码<input type="text" placeholder="请输入支付密码" v-model="mima" />
        </div>
      </div>
      <button class="reportOk" @click="add">确定</button>
    </div>
  </div>
</template>

<script>
import { Dialog } from "vant";
import {Account} from "../api/CancellationY"
export default {
  data() {
    return {
      cardNumber: this.$route.params.clip,
      mima:""
    };
  },
  methods: {
    go() {
      this.$router.push({
        name: "Debitcarddetails",
      });
    },
    add(){
      Account({card_id:this.cardNumber,password:this.mima,ssid:2}).then((res)=>{
        if (res.code == 200) {
          this.$router.push({
          name:"Closing"
        })
        }else{
          Dialog({ title: "温馨提示", message: res.msg });
        }
        
      })
    }
  },
};
</script>

<style scoped src="../assets/css/ReportLoss.css">
</style>